#include "VisitorDrawArm.h"
#include "Screen.h"
#include "Point.h"
#include "Arm.h"
#include "AlarmZone.h"

void VisitorDrawArm::WhatToDo(Arm * a)
{
Point A,B,C;
int x = (int)a->getLinkFirst().getStart().getX()/3;

A = a->getLinkFirst().getStart();
B = a->getLinkFirst().getEnd();
C = a->getLinkSecond().getEnd();

scr()->Line((int)A.getX(),YOFF-(int)A.getY(),(int)A.getX()+(int)B.getX(),YOFF-(int)B.getY()-(int)A.getY(),0x0f);
scr()->Line((int)A.getX()+(int)B.getX(),YOFF-(int)B.getY()-(int)A.getY(),(int)A.getX()+(int)C.getX(),YOFF-(int)C.getY()-(int)A.getY(),0x01);

scr()->puttext("Arm Info:",x,0,0x0f);
scr()->puttext("Angle 1:",x,1,0x0e);
scr()->puttext((int)a->getAngleFirst(),x+9,1,0x0d);
scr()->puttext("Angle 2:",x,2,0x0e);
scr()->puttext((int)a->getAngleSecond(),x+9,2,0x0d);

scr()->puttext("Size 1:",x,3,0x0e);
scr()->puttext(a->getLinkFirst().getDistance(),x+8,3,0x0c);
scr()->puttext("Size 2:",x,4,0x0e);
scr()->puttext(a->getLinkSecond().getDistance(),x+8,4,0x0c);

scr()->puttext("Number Of Arms In Zone:",50,0,0x0f);
scr()->puttext(Alarm()->GetArmsInZone(),75,0,0x0e);

}